<?php
header('Content-type:text/html;charset=utf8');
/**
 * xysc users Version1.0
 * ==================================
 * Copy 2016-2017
 * Web:www.xjh7.com
 * ==================================
 * Author:xjh
 * Date:2016-3-30
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<link rel="stylesheet"  href="<?php echo backweb_CSS_URL;?>index.css" />
<link rel="stylesheet"  href="<?php echo backweb_CSS_URL;?>common.css" />
<script type="text/javascript" src="<?php echo backweb_JS_URL;?>jquery.js"></script>
<script>

function updgoods($goods_id){
	parent.location.href="./index.php?r=backweb/goods/updategoods&goods_id="+$goods_id;
}


</script>
<style>
	span{display:inline;font-size:1.5em;padding:5px;color:#666}
	.attr{padding:20px;border:1px solid #ccc;}
	.attr p{padding:10px 0;border-bottom:1px solid #000;}
</style>
</head>
<body>
	
<div style="margin: 10px">
        <div >
        <form action="./index.php?r=backweb/goods/goodsAttrConfig&goods_id=<?php echo $goods_id;?>" name="fm" method="post">
         		<div class="attr">
				<?php for($i=0;$i<count($styleinfo);++$i){ 
					
						if($i==0)
						{?>		
							<p>
							<?php echo $styleinfo[$i]['parent_name'];?>
								<span><input id="ck" type="checkbox" name="attr[]" <?php if($styleinfo[$i]['goods_attr_id']!=null){?> checked="checked" <?php }?> value="<?php echo $styleinfo[$i]['attr_id'];?>"  /> <?php echo $styleinfo[$i]['attr_name'];?></span>	
							<?php }else 
							{
							if( $styleinfo[$i]['parent_name']== $styleinfo[$i-1]['parent_name'])
							{ ?>
									<span><input id="ck" type="checkbox" name="attr[]" <?php if($styleinfo[$i]['goods_attr_id']!=null){?> checked="checked" <?php }?> value="<?php echo $styleinfo[$i]['attr_id'];?>"  /> <?php echo $styleinfo[$i]['attr_name'];?></span>	
							<?php }
							else
							{ ?>
							</p>
							<p>
							<?php echo $styleinfo[$i]['parent_name'];?>
								<span><input id="ck" type="checkbox" name="attr[]" <?php if($styleinfo[$i]['goods_attr_id']!=null){?> checked="checked" <?php }?> value="<?php echo $styleinfo[$i]['attr_id'];?>"  /> <?php echo $styleinfo[$i]['attr_name'];?></span>
							<?php	}
								}
							}?>
							</p>
				 </div>
				  <input type="submit" name="send" id="btsave" value="设置" class="btn btn82 btn_save ml25" />	
				  <input type="reset" value="重置" class="btn btn82 btn_res ml10" />
		</form>
        </div>
        
        	<div style="text-align:center;">
				<p>共执行<em style="font-weight:bold;"><?php echo @$number;?></em>个sql，查询到<em style="font-weight:bold;"><?php echo @$info_count;?></em>条记录，用时 <em style="font-weight:bold;"><?php echo @$times;?></em> 秒</p>
				<p>版权所有 © 2016-2017 <em style="font-weight:bold;">xjh&lj</em>，并保留所有权利。</p>
			</div>
     </div>
</body>
<body>